<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>


<h2 class="formHeader" id="loginFormHeader">Please Log In or
	Register</h2>

<c:if test="${not empty error}">
	<div class="errorblock">
		Your login attempt was not successful, try again.<br /> Cause :
		${sessionScope["SPRING_SECURITY_LAST_EXCEPTION"].message}
	</div>
</c:if>

<form method="POST" action="<c:url value='film_rental/j_spring_security_check' />"
	class="securityForm" id="loginForm">
	<table class="formTable">
		<tr class="formRow">
			<td class="formCell">User:</td>
			<td class="formCell"><input type="text" name="j_username"
				value="" class="required" /></td>
		</tr>
		<tr class="formRow">
			<td class="formCell">Password:</td>
			<td class="formCell"><input type="password" name="j_password"
				class="required" /></td>
		</tr>
		<tr class="formRow">
			<td class="formCell"></td>
			<td class="formCell"><input hidden="true" type='checkbox'
				name='_spring_security_remember_me' checked="checked" /></td>
		</tr>
		<tr class="formRow">
			<td class="formCell"><input name="submit" type="submit"
				value="Submit" class="formButton" /> <input name="reset"
				type="reset" class="formButton" /></td>
			<td class="formCell">Not yet registered? <a
				href="/film_rental/register">Register now.</a></td>
		</tr>
	</table>
</form>

